import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner temperature = new Scanner(System.in);
        double F = temperature.nextFloat();
        double c = (5*(F-32))/9.0;
        System.out.printf("%.3f",c);
    }
}
